package com.ruoyi.platform.system.menu.controller;

import com.ruoyi.base.controller.BaseController;
import com.ruoyi.base.pojo.HttpResult;
import com.ruoyi.base.redis.role.RoleMenuRedis;
import com.ruoyi.platform.system.menu.pojo.MenuTreeDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
* 菜单权限表
* @author lcf
* @version 0.0.1
* @since 2020-11-16 02:15:03
*/
@Api(tags = {"菜单管理"})
@RestController
@Scope("request")
@RequestMapping("/menu")
public class MenuController extends BaseController {
    @Autowired
    private RoleMenuRedis roleMenuRedis;
    /**
     * 获取菜单权限列表
     */
    @ApiOperation("获取菜单权限列表")
    @GetMapping("/list")
    public HttpResult<List<MenuTreeDTO>> getMenuList() {
        return data(roleMenuRedis.getList());
    }
}